package com.apes.fn.server.workDesk.repository;

import com.apes.fn.server.workDesk.model.WorkDeskConfig;
import com.apes.fn.server.workDesk.model.WorkDeskUserCount;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface WorkDeskUserCountRepository extends CustomRepository<WorkDeskUserCount, String> {

    @Query(value = "select * from WORK_DESK_USE_COUNT A WHERE A.USE_DATE = to_date(:useDate,'yyyy-MM-dd') AND A.USER_ID = :useParty AND A.work_desk_config_id = :useWorkDeskFunction",nativeQuery = true)
    WorkDeskUserCount findByUseDateAndUsePartyAndUseWorkDeskFunction(@Param("useDate") String useDate,@Param("useParty") Integer useParty,@Param("useWorkDeskFunction") String useWorkDeskFunction);
}
